package watcher;

/**
 * 具体的观察者对象，实现更新的方法，是自身状态和被观察状态一样
 * Created by zzy on 2018/1/1.
 */
public class ConcreteObserver implements Observer {

    private String observerStatus;

    @Override
    public void update(Subject subject) {
        String status=((ConcreteSubject)subject).getSubjectState();
        this.observerStatus=status;
    }

    private void print(String content){
        System.out.println(content);
    }
}
